arr = [64, 34, 25, 12, 22, 11, 90]
n = len(arr)

for i in range(n):
    arr_min = i
    for j in range(i+1, n):
        if arr[arr_min] > arr[j]:
            arr_min = j
    arr[i], arr[arr_min] = arr[arr_min], arr[i]
print(arr)
